#*****************************************************************************
#  $Id: Makefile 448 2010-01-05 09:51:35Z naohisa.sakamoto $
#*****************************************************************************

#=============================================================================
#  Include.
#=============================================================================
include ../../kvs.conf
include ../../Makefile.def


#=============================================================================
#  INCLUDE_PATH, LIBRARY_PATH, LINK_LIBRARY, INSTALL_DIR.
#=============================================================================
INCLUDE_PATH := -I.. $(GL_INCLUDE_PATH) $(EGL_INCLUDE_PATH)
LIBRARY_PATH := $(GL_LIBRARY_PATH) $(EGL_LIBRARY_PATH)
LINK_LIBRARY := $(GL_LINK_LIBRARY) $(EGL_LINK_LIBRARY)
INSTALL_DIR  := $(KVS_DIR)


#=============================================================================
#  Include build rule.
#=============================================================================
include BuildRule.mk


#=============================================================================
#  Project name.
#=============================================================================
TARGET_LIB := $(OUTDIR)/$(LIB_KVS_SUPPORT_EGL)


#=============================================================================
#  Build rule.
#=============================================================================
$(TARGET_LIB): $(OBJECTS)
	$(AR) $@ $^
	$(RANLIB) $@


#=============================================================================
#  build.
#=============================================================================
build:: $(TARGET_LIB)


#=============================================================================
#  clean.
#=============================================================================
clean::
	$(RMDIR) $(OUTDIR)


#=============================================================================
#  install.
#=============================================================================
install::
	$(MKDIR) $(INSTALL_DIR)/lib
	$(INSTALL) $(TARGET_LIB) $(INSTALL_DIR)/lib
	$(RANLIB) $(INSTALL_DIR)/lib/$(LIB_KVS_SUPPORT_EGL)
